package week_01.arr;

import java.io.*;
import java.util.Arrays;

public class sort {
    public static void main(String[] args) throws

            IOException {
        String pathName = "src\\week_01\\arr\\1w random number.txt";
        FileReader fileReader = new FileReader(pathName);
        BufferedReader bufferedReader=new BufferedReader(fileReader);
        String textLine="";
        String str="";
        while ((textLine=bufferedReader.readLine())!=null){
            str +=textLine;
        }
        Integer[] a=new  Integer[10000];
        Integer[]b =new Integer[100];
        String[] arr=str.split(",");
        for (int i=0;i<b.length;i++){
            b[i]=Integer.parseInt(arr[i]);
        }
        for (int i=0;i<a.length;i++){
            a[i]=Integer.parseInt(arr[i]);
        }
        Arrays.sort(a);
        Arrays.sort(b);
        System.out.println(Arrays.toString(a));
        System.out.println(Arrays.toString(b));
    }

}
